package com.example.demo01.Entity.mobileEntity;

import org.springframework.stereotype.Component;

@Component
public class ServiceOrder {
    //attributes
    protected Integer id;
    protected String username;
    protected String serviceContent;
    protected String serviceAddress;
    protected Float lon;
    protected Float lat;
    protected String orderTime;
    protected Integer orderState;

    //setter

    public void setId(Integer id) {
        this.id = id;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setServiceContent(String serviceContent) {
        this.serviceContent = serviceContent;
    }

    public void setServiceAddress(String serviceAddress) {
        this.serviceAddress = serviceAddress;
    }

    public void setLon(Float lon) {
        this.lon = lon;
    }

    public void setLat(Float lat) {
        this.lat = lat;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }

    public void setOrderState(Integer orderState) {
        this.orderState = orderState;
    }

    //getter

    public Integer getId() {
        return id;
    }

    public String getOrderTime() {
        return orderTime;
    }

    public String getUsername() {
        return username;
    }

    public String getServiceContent() {
        return serviceContent;
    }

    public String getServiceAddress() {
        return serviceAddress;
    }

    public Float getLon() {
        return lon;
    }

    public Float getLat() {
        return lat;
    }

    public String getorderTime() {
        return orderTime;
    }

    public Integer getOrderState() {
        return orderState;
    }
    
    //constructors
    public ServiceOrder() {
    }

    public ServiceOrder(String username, String serviceContent, String serviceAddress, Float lon, Float lat) {
        this.username = username;
        this.serviceContent = serviceContent;
        this.serviceAddress = serviceAddress;
        this.lon = lon;
        this.lat = lat;
    }

    public ServiceOrder(String username, String serviceContent, String serviceAddress, Float lon, Float lat, String orderTime, Integer orderState) {
        this.username = username;
        this.serviceContent = serviceContent;
        this.serviceAddress = serviceAddress;
        this.lon = lon;
        this.lat = lat;
        this.orderTime = orderTime;
        this.orderState = orderState;
    }

    public ServiceOrder(Integer id, String username, String serviceContent, String serviceAddress, Float lon, Float lat, String orderTime, Integer orderState) {
        this.id = id;
        this.username = username;
        this.serviceContent = serviceContent;
        this.serviceAddress = serviceAddress;
        this.lon = lon;
        this.lat = lat;
        this.orderTime = orderTime;
        this.orderState = orderState;
    }

    //toString
    @Override
    public String toString() {
        return "ServiceOrder{" +
                "username='" + username + '\'' +
                ", serviceContent='" + serviceContent + '\'' +
                ", serviceAddress='" + serviceAddress + '\'' +
                ", lon=" + lon +
                ", lat=" + lat +
                ", orderTime='" + orderTime + '\'' +
                ", orderState=" + orderState +
                '}';
    }
}
